import 'package:client_ui/api/Request.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class GlobalData with ChangeNotifier {
  int _id = 0;
  String _name = "";
  List<Widget> _chatDisplayList = [];

  int get id => _id;

  String get name => _name;

  List<Widget> get chatDisplayList => _chatDisplayList;

  void setId(int id) {
    _id = id;
    notifyListeners();
  }

  void setName(String name) {
    _name = name;
    notifyListeners();
  }

  void addChatDisplayList(Widget widget) {
    _chatDisplayList.add(widget);
    notifyListeners();
  }

  void clearChatDisplayList() {
    _chatDisplayList = [];
    notifyListeners();
  }
}
